@if($nav->hasChildren())
    <li class="admin-parent">
        <a class="am-cf am-collapsed" data-am-collapse="{target: '#nav-csp-{{ $nav->name }}'}"><span
                    class="{{ $nav->icon }}"></span> @lang('admin.admin-panel.nav-name.' . $nav->name) <span
                    class="am-icon-angle-right am-fr am-margin-right"></span></a>
        <ul class="am-list admin-sidebar-sub am-collapse" id="nav-csp-{{ $nav->name }}">
            @foreach($nav->children as $subNav)
                @include('admin.common.sub-nav', ['nav' => $subNav])
            @endforeach
        </ul>
    </li>
@else
    <li>
        <a href="@if(!empty($nav->href)) {{ $nav->href }}@elseif(!empty($nav->route)) {{ route($nav->route) }}@else #@endif"><span
                    class="{{ $nav->icon }}"></span> @lang('admin.admin-panel.nav-name.' . $nav->name)</a></li>
@endif